<?php
	if (!isset($artifact_type)) {
		$artifact_type = "G";
	}
?>
<div id="news-display-area">
	<form action="<?php echo $config_file['web_root']?>/php/admin/news_admin.php" method="post" onsubmit="AjaxFormPost.send(this,newsUpdatePostCallback); return false;">
	<div class="page-spanner">
		<table id="form-table" border="0" align="left" cellspacing="0" cellpadding="0">
			<tr>
				<td>
					<span class="form-field">News Type<br>
					<select name="news-type" id="news-type">
						<option value="A" <?php if ($artifact_type == "A") echo "selected"?>>Article</option>
						<option value="C" <?php if ($artifact_type == "C") echo "selected"?>>Calculator</option>
						<option value="D" <?php if ($artifact_type == "D") echo "selected"?>>DIY</option>
						<option value="E" <?php if ($artifact_type == "E") echo "selected"?>>Event</option>
						<option value="G" <?php if ($artifact_type == "G") echo "selected"?>>General</option>
						<option value="M" <?php if ($artifact_type == "M") echo "selected"?>>Miscellaneous</option>
						<option value="P" <?php if ($artifact_type == "P") echo "selected"?>>Plant</option>
						<option value="R" <?php if ($artifact_type == "R") echo "selected"?>>Review</option>
						<option value="T" <?php if ($artifact_type == "T") echo "selected"?>>Tank Gallery</option>
					</select></span>
				</td>
			</tr>
			<tr>
				<td>
					<span class="form-field">News [Required, max 200 charecters]: <span id="char-count" class="green">200</span> more <span id="char-word">characters</span> left</span><br>
					<textarea class="form-input textbox" name="news" id="news-text" cols="60" rows="5" onkeyup="checkMessageSize(this,200)"><?php echo $news?></textarea></span>				
				</td>
			</tr>
			<tr>
				<td>
					<span class="form-field">URL [max 45 charecters]:<br><input class="textbox" name="url" id="url" max-length="45" size="45" value="<?php echo urlencode($url)?>"></span>
				</td>
			</tr>
			<tr>
				<td>
					<span class="form-field">Bookmark:<br><input class="textbox" name="bookmark" id="bookmark" size="45" value="<?php echo $bookmark?>"></span>
				</td>
			</tr>
			<tr><td><span class="form-field"><input type="submit" id="submit-button" class="active" name="submit" onclick="inactivate(this)" value="Submit"/></span></td></tr>
		</table>
	</div>
	</form>
</div>
